React = require('react')
Card = require('antd-mobile/lib/card')
# ListView = require('antd-mobile/lib/list-view')
Flex = require('antd-mobile/lib/flex')
Icon = require('antd-mobile/lib/icon')
Toast = require('antd-mobile/lib/toast')
RefreshControl = require('antd-mobile/lib/refresh-control')
TopNotice = require('antd-mobile/lib/notice-bar')
{StyleSheet,WebView,View,Image,Text,ScrollView,TouchableHighlight,StyleSheet,Navigator,ListView,ActivityIndicator,TouchableOpacity} = require('react-native')
Dimensions = require('Dimensions')
{ width, height } = Dimensions.get('window')
{View} = require('react-native')
{fetchGetList,fetchRefreshList} = require('../actions/page_planDetail.js')
{connect} = require('react-redux')
_ = require('underscore')
moment = require('moment')
backImg = require('../img/back.png')
BaseWebView = require('../mixins/baseWebView.js')
Web_Gxlxsq = React.createClass
  mixins:[BaseWebView]
  renderHeader:->
    <View style={{flexDirection:'row',flex:0,height:60,alignItems:'center', justifyContent:'center',backgroundColor:'#0066FF'}}>
      <View style={{flex:1,padding:10}}>
        <TouchableOpacity onPress={=>@props.navigator.pop()}>
          <Image source={backImg}  style={{height:30,width:30,resizeMode:'contain'}}/>
        </TouchableOpacity>
      </View>
      <View style={{flex:3,justifyContent:'center',alignItems:'center'}}>
        <Text style={{fontSize:20,color:'#ffffff'}}>公休/轮休申请</Text>
      </View>
      <View style={{flex:1,alignItems:'flex-end',padding:10}}>
      </View>
    </View>
  source:->
    {uri:"http://202.136.214.163:801/PilotGxlxRequestList.aspx?pilotCode=#{@props.userInfo.pilotCode}&pilotName=#{@props.userInfo.pilotName}"}
  # $('#btnSearch').click();
  # $('.container-fluid').css({paddingTop:'20px',paddingBottom:'400px'});
      # $('body').css({backgroundColor:'#000000'});

  injectedJavaScript:->
    "$('body').height(#{height-60});" +
    """
      $('.breadcrumb').css({visibility:'hidden'});
     """

mapStateToProps = (state)->
  userInfo:state.userInfo
  connected:state.appState.connected
module.exports = connect(mapStateToProps)(Web_Gxlxsq)
